import md5String from 'crypto-js/md5'
import aesString from 'crypto-js/aes'

export const md5 = string => md5String(string).toString()
export const aes = (string, key) => aesString.encrypt(string, key).toString()
export let passwordHash = string => md5(string)

export function setEncryption (key) {
  passwordHash = key
}
